<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <script language="javascript" type="text/javascript">
        function validate_required( field, alerttext ){
            with ( field ) {
                if ( value ==null || value == "" ){
                    alert( alerttext );
                    return false;
                }
                else {
                    return true;
                }
            }
        }
        function validate_email( field,alerttxt ){
            with( field ){
                apos = value.indexOf( "@" );
                dotpos = value.lastIndexOf( "." );
                if( apos<1 || dotpos-apos<2 ){
                    alert( alerttxt );
                    return false;
                }
                else {
                    return true;
                }
            }
        }
        

        function validate_form( thisform ) {
            with ( thisform ) {
    //            if ( validate_required( email,"Please fill the email address" )==false ){
                if ( validate_email( email,"Not a valid email address" )==false ){
                    email.focus();
                    return false;
                }
            }
        }
    </script>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
    <title></title>
</head>
<body>
    <form action="submit.htm" onsubmit="return validate_form(this)" method="post">
        Email: <input name="email" size="30" type="text" />
        <input type="submit" value="Submit" />
    </form>
</body>
</html>

